package datos;

// Generated 14/03/2010 01:41:37 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Turno generated by hbm2java
 */
@Entity
@Table(name = "turno", catalog = "peluqueria")
public class Turno implements java.io.Serializable {

	private Long idTurno;
	private Date fecha;
	private Set<Reserva> reservas = new HashSet<Reserva>(0);

	public Turno() {
	}

	public Turno(Date fecha) {
		this.fecha = fecha;
	}

	public Turno(Date fecha, Set<Reserva> reservas) {
		this.fecha = fecha;
		this.reservas = reservas;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID_turno", unique = true, nullable = false)
	public Long getIdTurno() {
		return this.idTurno;
	}

	public void setIdTurno(Long idTurno) {
		this.idTurno = idTurno;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "fecha", nullable = false, length = 19)
	public Date getFecha() {
		return this.fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "turno")
	public Set<Reserva> getReservas() {
		return this.reservas;
	}

	public void setReservas(Set<Reserva> reservas) {
		this.reservas = reservas;
	}

}
